public class Solution3 {
    int ret;
    int path;
    public int subsetXORSum(int[] nums) {
        dfs(nums,0);
        return ret;
    }
    public void dfs(int[] nums,int pos) {
        ret += path;
        for(int i=pos;i<nums.length;i++) {
            path ^=nums[i];
            dfs(nums,i+1);
            //唯一的问题：path怎么恢复 ->利用异或运算的消消乐
            path^=nums[i];
        }
    }
}
